//
//  DownLineTableViewCell.m
//  DA_V
//
//  Created by 周季阳 on 15/5/7.
//  Copyright (c) 2015年 zhouhai. All rights reserved.
//

#import "DownLineTableViewCell.h"
#import "InterFace.h"
#import "UIViewAdditions.h"
#import "ZiDonBuDanView.h"
#import "ZiDongBuHuoListModel.h"
@implementation DownLineTableViewCell
@synthesize zDownLineTime,zOrder,zProfit,zTotal;
- (void)awakeFromNib {
    // Initialization code
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];
    
    // Configure the view for the selected state
}

- (id)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier
{
    self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
    if (self) {
        
        
//        zOrder = [[UILabel alloc]initWithFrame:CGRectMake(10, 5, SCREEN_WIDTH/2-10, 20)];
//        zOrder.textColor = [UIColor blackColor];
//        zOrder.textAlignment = NSTextAlignmentLeft;
//        zOrder.font = [UIFont systemFontOfSize:12];
//        [self addSubview:zOrder];
//        
//        
//        zDownLineTime = [[UILabel alloc]initWithFrame:CGRectMake(10, zOrder.bottom, SCREEN_WIDTH/2-10, 20)];
//        zDownLineTime.textColor = [UIColor grayColor];
//        zDownLineTime.textAlignment = NSTextAlignmentLeft;
//        zDownLineTime.font = [UIFont systemFontOfSize:12];
//        [self addSubview:zDownLineTime];
//        
//        zTotal = [[UILabel alloc]initWithFrame:CGRectMake(SCREEN_WIDTH/2, 5, SCREEN_WIDTH/2-10, 20)];
//        zTotal.textColor = [UIColor blackColor];
//        zTotal.textAlignment = NSTextAlignmentRight;
//        zTotal.font = [UIFont systemFontOfSize:12];
//        [self addSubview:zTotal];
//        
//        
//        zProfit = [[UILabel alloc]initWithFrame:CGRectMake(SCREEN_WIDTH/2, zTotal.bottom, SCREEN_WIDTH/2-10, 20)];
//        zProfit.textColor = [UIColor blackColor];
//        zProfit.textAlignment = NSTextAlignmentRight;
//        zProfit.font = [UIFont systemFontOfSize:12];
//        [self addSubview:zProfit];
//        
//        UIView *lineView = [[UIView alloc]initWithFrame:CGRectMake(10, 49, SCREEN_WIDTH-20, 0.5)];
//        lineView.backgroundColor = [UIColor lightGrayColor];
//        [self addSubview:lineView];
        
        //        6
        
                self.ziDonBuDanView = [[[NSBundle mainBundle] loadNibNamed:@"Shopping_list_xibs" owner:self options:nil] objectAtIndex:6];
                 self.ziDonBuDanView.frame = CGRectMake(10, 5, SCREEN_WIDTH-20, 40);
        
        
                [self.contentView addSubview:self.ziDonBuDanView];
    }
    return self;
}


- (void)showZidonBuhuoView:(id)data{
    ZiDongBuHuoListModel *model =data;
    self.ziDonBuDanView.listNium.text = [NSString stringWithFormat:@"订单号:%@",model.MasterOrderID];// @"订单号:12121312121212";
    self.ziDonBuDanView.xiaDanTime.text = [NSString stringWithFormat:@"下单时间:%@",model.AddTime]; //@"下单时间:2015.05.06 14:47";
    self.ziDonBuDanView.nowPrice.text = [NSString stringWithFormat:@"(¥%.1f)",model.TotalAmount.floatValue];//@"总金额:￥99(￥186)";
    self.ziDonBuDanView.oldPrice.text = [NSString stringWithFormat:@"¥%.1f",model.DiscountAmount.floatValue];//@"总金额:￥99(￥186)";
    self.ziDonBuDanView.profitNumber.text = [NSString stringWithFormat:@"¥%@",model.Profit];//@"总金额:￥99(￥186)";
    
}
@end
